export default {
    setStateInfo(state,data){
        state.stateInfo = data;
    },
    setUpdateState(state, data){
        state.stateDetail = data;
    },
    updateOrderStateStatus(state,value){
        state.stateDetail.orderStatus = value;
    },
    setServiceData(state, data){
        state.serviceData = data;
    },
    updateArriveTime(state,value){
        state.stateDetail.arriveTime = value;
    },
    updateSpId(state,value){
        if(state.stateDetail.cmSp){
            state.stateDetail.cmSp.spId = value;
        }else{
            return state.stateDetail.spId = value;
        }
        
    }
    // editState(state, obj) {
    //     let index = state.stateInfo.findIndex(item => {
    //         return item.orderno === obj.orderno
    //     })
    //     state.stateInfo.splice(index, 1, obj);
    // }
}